extends "../feiteliedadi-3/feiteliedadi-3.gd"


var baseId = ""
var upText1 = "暗黑狂想曲影响范围+1"
var upText2 = "破坏交响曲伤害提高35%"
func _extInit():
	._extInit()
	lv = 4             #等级的设置
	addSkill("每{cd}秒对全体敌人造成[本回合已受伤害量20%]的技能伤害", "破坏交响曲", "vengeanceFlame", 8)
var p4 = 1
func _castCdSkill(id):
	._castCdSkill(id)
	if id == "vengeanceFlame":
		var enemy = getAllChas(1)
		var damage = min(att.maxHp, hurtNum1 * 0.2)
		createCustEff(position, "eff/shuiHuanBao", 6, false, 1, Vector2(0, -40))
		for i in enemy:
			azurHurtChara(i, damage, sys.HurtType.WEAPON, sys.AtkType.SKILL, "破坏交响曲", false, p4)

var hurtNum1 = 0
func _onBattleStart():
	._onBattleStart()
	hurtNum1 = 0

func onHurtEnd(atkInfo):
	.onHurtEnd(atkInfo)
	hurtNum1 += atkInfo.finalDmg

func upgrade():
	.upgrade()
	if upgraded == 1:
		p3 = 4
	if upgraded == 2:
		p4 = 1.35